﻿// -----------------------------------------------------------------------
// <copyright file="OnFinallyTask.cs" company="Sławomir Rosiek">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace Rosieks.Web.Flow.Internals
{
    using System;

    /// <summary>
    /// TODO: Update summary.
    /// </summary>
    internal class DisposeTask : IDisposable
    {
        private Action onDispose;

        /// <summary>
        /// Initializes a new instance of the <see cref="T:OnFinallyTask"/> class.
        /// </summary>
        public DisposeTask(Action onDispose)
        {
            this.onDispose = onDispose;
        }

        public void Dispose()
        {
            this.onDispose();
        }
    }
}
